﻿using System;
using System.Collections.Generic;
using System.Text;
using Kugar.Web.Wechat.Enums;

namespace Kugar.Web.Wechat.Entities
{
    public interface IWechatUserOAuth
    {
        /// <summary>
        /// 会员OpenID
        /// </summary>
        string OpenID { set; get; }

        /// <summary>
        /// 会员昵称
        /// </summary>
        string NickName { set; get; }

        /// <summary>
        /// 会员对应的UnionID
        /// </summary>
        string UnionID { set; get; }

        /// <summary>
        /// 会员头像地址
        /// </summary>
        string HeaderPortraitUrl { set; get; }

        /// <summary>
        /// 本次会员授权的范围
        /// </summary> 
        WechatOAuthScope Scope { set; get; }

        string AccessToken { set; get; }
        string RefreshToken { set; get; }
    }

    /// <summary>
    /// 微信授权的用户信息
    /// </summary>
    public class WechatUserOAuth : IWechatUserOAuth
    {

        /// <summary>
        /// 会员OpenID
        /// </summary>
        public string OpenID { set; get; }

        /// <summary>
        /// 会员昵称
        /// </summary>
        public string NickName { set; get; }

        /// <summary>
        /// 会员对应的UnionID
        /// </summary>
        public string UnionID { set; get; }

        /// <summary>
        /// 会员头像地址
        /// </summary>
        public string HeaderPortraitUrl { set; get; }

        /// <summary>
        /// 本次会员授权的范围
        /// </summary> 
        public WechatOAuthScope Scope { set; get; }

        public string AccessToken { set; get; }

        public string RefreshToken { set; get; }
    }

    public class WechatUserDetailInfo
    {
        /// <summary>
        /// 会员OpenID
        /// </summary>
        public string OpenID { set; get; }

        /// <summary>
        /// 会员昵称
        /// </summary>
        public string NickName { set; get; }

        /// <summary>
        /// 会员对应的UnionID
        /// </summary>
        public string UnionID { set; get; }

        /// <summary>
        /// 会员头像地址
        /// </summary>
        public string HeaderPortraitUrl { set; get; }

        /// <summary>
        /// 会员是否已订阅
        /// </summary>
        public bool IsSubscribe { set; get; }

        /// <summary>
        /// 性别 1=男  2=女 0=未知
        /// </summary>
        public int Sex { set; get; }
    }
}
